<?php

namespace Modules\Common\Models;

use Modules\Common\Models\Validation\OrdersValidation;


class Orders extends BaseModel
{
    protected $connection = 'mysql';
    protected $table ="orders";
    use OrdersValidation;

    public function member()
    {
        return $this->belongsTo(Members::class, 'member_id');
    }
    
    public function ebook()
    {
        return $this->belongsTo(Ebooks::class, 'ebook_id');
    }

    public function adminUser()
    {
        return $this->belongsTo(AdminUser::class, 'admin_user_id');
    }
    
    public function user()
    {
        return $this->belongsTo(Users::class, 'user_id');
    }
    
    public function subscriptionTypes()
    {
        return $this->belongsTo(SubscriptionTypes::class, 'subscription_type_id');
    }
    
    
}